package com.xuecheng;

import com.xuecheng.base.model.PageParam;
import com.xuecheng.content.mapper.CourseBaseMapper;
import com.xuecheng.content.mapper.CourseCategoryMapper;
import com.xuecheng.content.model.dto.CourseCategoryTreeDto;
import com.xuecheng.content.model.dto.QueryCourseParamDto;
import com.xuecheng.content.model.po.CourseBase;
import com.xuecheng.content.model.po.CourseCategory;
import com.xuecheng.content.model.po.PageResult;
import com.xuecheng.content.service.CourseBaseService;
import com.xuecheng.content.service.impl.CourseCategoryServiceImpl;
import org.junit.jupiter.api.Test;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

/**
 * @author 冯佳鑫 又菜又爱学
 * @version 1.0
 * @DATE now()
 */

@SpringBootTest()

@MapperScan(basePackages = "com.xuecheng.content.mapper")
public class CourCategorytest {
    @Autowired
    private CourseCategoryServiceImpl courseCategoryService;

    @Test
    void list() {


        List<CourseCategoryTreeDto> treenodes = courseCategoryService.queryTreeNodes("1");
        System.out.println(treenodes.size());
        System.out.println(treenodes);

        List<CourseCategoryTreeDto> treenodes2 = courseCategoryService.treenodes("1");
        System.out.println(treenodes2.size());
        System.out.println(treenodes2);

    }
}
